package com.xiaozhen.quartz.job;

import com.xiaozhen.quartz.config.BaseJob;
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobKey;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/11/16 13:08
 * @description:
 */
@Slf4j
public class TestJob implements BaseJob {

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        JobDetail jobDetail = context.getJobDetail();
        JobKey jobKey = jobDetail.getKey();
        String name = jobKey.getName();
        String group = jobKey.getGroup();
        log.info("group:{},name:{}", group, name);
    }
}
